import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
//引入signin模块
import Signin from '@/components/SignIn/SignIn'
//声明一个动态路由
const Home = () => import(/*webpackChunkName:'Home'*/ '@/components/Home/Home')
const PermissionManage = () => import(/*webpackChunkName:'PermissionManage'*/ '@/components/Home/System/PermissionManage')
const JueseManage = () => import(/*webpackChunkName:'JueseManage'*/ '@/components/Home/System/JueseManage')
const AccountManage = () => import(/*webpackChunkName:'AccountManage'*/ '@/components/Home/System/AccountManage')
const LotteryManage = () => import(/*webpackChunkName:'LotteryManage'*/ '@/components/Home/LotteryManage/LotteryManage')
export default new Router({
  routes: [
  	 {
  	 	 path:'/',
  	 	 redirect:{name:'Home'}
  	 },
  	 {
	  	 	path:'/Home',
	  	 	name:'Home',
	  	 	component:Home,
	  	 	children:[
	  	 		{
	  	 			path:'PermissionManage',
	  	 			name:'权限管理',
	  	 			component:PermissionManage
	  	 		},
	  	 		{
	  	 			path:'JueseManage',
	  	 			name:'角色管理',
	  	 			component:JueseManage
	  	 		},
	  	 		{
	  	 			path:'AccountManage',
	  	 			name:'用户管理',
	  	 			component:AccountManage
	  	 		},
	  	 		{
	  	 			path:'LotteryManage',
	  	 			name:'彩票列表',
	  	 			component:LotteryManage
	  	 		},
	  	 	]
  	 },
     {
       path: '/Signin',
       name: 'Signin',
       component: Signin
     }
  ]
})
